<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <!-- Bootstrap 5 CDN -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        body { background: #f8f9fa; font-size: 1.1rem; }
        .login-container { max-width: 400px; margin: 60px auto; padding: 2rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
        @media (max-width: 600px) {
            .login-container { max-width: 98vw; margin: 20px 1vw; padding: 1rem; }
            h2, .h2 { font-size: 1.3rem; }
            body { font-size: 1rem; }
            .form-control, .btn, .form-label { font-size: 1rem; }
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h2 class="mb-4 text-center">逐光帮会管理系统</h2>
        {% if error %}<div class="alert alert-danger">{{ error }}</div>{% endif %}
        <form method="post">
            <div class="mb-3">
                <label for="username" class="form-label">用户名</label>
                <input type="text" class="form-control" id="username" name="username" required>
            </div>
            <div class="mb-3">
                <label for="password" class="form-label">密码</label>
                <input type="password" class="form-control" id="password" name="password" required>
            </div>
            <button type="submit" class="btn btn-primary w-100">登录</button>
        </form>
        <a href="/attendance_table" class="btn btn-outline-secondary w-100 mt-3">直接查看总考勤表</a>
    </div>
</body>
</html>
